﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem
{
    public static class DateTimeUtil
    {
        /// <summary>
        /// 取MongoDB时间
        /// </summary>
        /// <param name="time"></param>
        /// <returns></returns>
        public static DateTime ToMongoDBTime(this DateTime time)
        {
            return time.AddHours(-8);
        }
        /// <summary>
        /// 取本地时间
        /// </summary>
        /// <param name="time"></param>
        /// <returns></returns>
        public static DateTime ToLocalDateTime(this DateTime time)
        {
            return time.AddHours(8);
        }
    }
}
